package uniandes.dermatologia;

import uniandes.dermatologia.singleton.DermatologiaUniandesApp;
import uniandes.dermatologia.training.CaseLogic;
import uniandes.dermatologia.training.activities.IdentificationCaseActivity;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class CaseDescription extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_case_description);
		DermatologiaUniandesApp app = (DermatologiaUniandesApp)getApplication();
		CaseLogic caseLogic = app.getCurrentCaseLogic();
		TextView txtCaseDescr = (TextView)findViewById(R.id.txtCaseDescr);
		txtCaseDescr.setText(caseLogic.getDescription());
		Button btnStartCase = (Button)findViewById(R.id.btnStartCase);
		btnStartCase.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(CaseDescription.this, IdentificationCaseActivity.class);
				startActivity(intent);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.case_description, menu);
		return true;
	}

}
